package com.zx.flow.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class FilterConfig {


    @Bean
    public FilterRegistrationBean<TraceServletFilter> exceptionFilterRegistration() {
        log.info("[trace auto config] TraceServletFilter");
        FilterRegistrationBean<TraceServletFilter> registration = new FilterRegistrationBean<TraceServletFilter>();
        registration.setFilter(new TraceServletFilter());
        registration.addUrlPatterns("/*");
        registration.setName("TraceServletFilter");
        return registration;
    }
}
